<?php
	header('content-type:text/html;charset=utf-8');
	require 'mysqlpublic.php';
	$pic=$_POST['pic'];
	if($pic=="big"){
	$sql="select * from lunbopic where type='l'";
	$result=mysql_query($sql);
	$row=mysql_num_rows($result);
	$ar=array();
	for($i=0;$i<$row;$i++){
        $sql_arr = mysql_fetch_assoc($result);
		$ar[$i]=array();
		array_push($ar[$i],$sql_arr['href'],$sql_arr['imgurl']);
	}
	echo json_encode($ar);
	mysql_close($conn);
}else{
	$sql="select * from lunbopic where type='s'";
	$result=mysql_query($sql);
	$row=mysql_num_rows($result);
	$ar=array();
	for($i=0;$i<$row;$i++){
        $sql_arr = mysql_fetch_assoc($result);
		$ar[$i]=array();
		array_push($ar[$i],$sql_arr['href'],$sql_arr['imgurl']);
	}
	echo json_encode($ar);
}
	
?>